<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>欢乐英语小测验</title>
	<link rel="stylesheet" href="/Public/css/index.css">
</head>
<body>
<div class="container" id="<?php echo ($studentId); ?>">
	<div class="top-bar">
		<img src="/Public/images/timg.jpg" alt="">
	</div>
	<div class="middle-box">
		<h1>英语词量测试</h1>
		<div class="ques-wrap">
			<div class="tip">单选题</div>
			<div class="title">
				<span>1</span>/
				<span>50</span>
				<span>Do you love English？</span>
			</div>
			<div class="options">
				<div class="option"><span>A：Very much!</span></div>
				<div class="option"><span>B：A little</span></div>
				<div class="option"><span>C：Just so so</span></div>
				<div class="option"><span>D：Learn it for fun..</span></div>
			</div>
			<!-- <div class="you-ans">
				<span class="wrong">您答错了！标准答案是:A</span>
				<span class="right">太棒啦！标准答案是:B</span>
			</div> -->
			<div class="btns-wrap">
				<!-- <a href="javascript:;" class="btn">上一题</a> -->
				<a href="javascript:;" class="btn">下一题</a>
			</div>
		</div>
	</div>
</div>
<script src="/Public/js/jquery-1.11.1.min.js"></script>
<script>
var indexPage= {
	init: function(){

	},
	events: function(){
		var _ans;
		//单选择题
		$('.container').delegate(".option","click",function(){
			$(this).toggleClass("active").siblings().removeClass("active");
			_ans = $(".option").index($(this));
		});

		$('.btn').on("click",function(){
			if($(".active").size() ==0){
				alert("请选择一个答案！");
			}
			// 保存答案
			console.log(_ans);
		});
	},
	run: function(){
		this.events();
	}
};
indexPage.run();
</script>
</body>
</html>